<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.js"></script>
    <script src="../dist/mathEdit.min.js"></script>
</head>

<body>
    <div id="myEdit"></div>
    <button id="getVal">获取值</button>
    <button id="getLatex">获取Latex值</button>
    <script>
        var mathEdit = new window.MathEdit({
            elId: 'myEdit',
            config: {
                defaultFontSize: '18px',
                viewFontSize: '12px'
            }
        })
        document.getElementById('getVal').addEventListener('click', function () {
            console.log(mathEdit.getValue())
        })
        document.getElementById('getLatex').addEventListener('click', function () {
            console.log(mathEdit.getLatex())
        })
    </script>
</body>

</html>